<!DOCTYPE html>
<html>
    <head>
        <meta charset='utf-8' />
        <style>
            div{
                width:150px;height:150px;
            }
            div.c1{
                background-color:deeppink;
                float:left;
            }
            div.c2{
                
                background-color:gold;
                float:left;
            }
            div.c2::after{    /*水哥low了 欠一个method*/
                content:'';
                display:block;
                width:100%;
                height:0px;
                clear:both;
                visibility:hidden;
            }
            div.c3{
                width:180px;height:180px;
                background-color:greenyellow;
                float:left;
            }
            
            .xxoo{
                height:0px;
                clear:both;
            }
        </style>
    </head>
    <body>
        <h2>浮动要缺点</h2>
        <div style="border:1px solid green;width:100%;overflow:hidden;">
            <div class='c1'></div>
            <div class='c2'></div>
           <!--  <div class='xxoo'></div> -->
            <div class='c3'>aaaaaaaaaaa</div>        
        </div>
       
    </body>
</html>